class Cat:
    __color='black'
    #私有成员前面带双下滑线
    def __init__(self, name):
        self.name = name

    @classmethod
    def speak(cls):
        print('miao~')
    # @staticmethod

    def miao(self):
        print( 'miaomiao')
cat=Cat('小黑')
print(cat.name)
cat.miao()
# 实例属性不能通过类名来调
# Cat.miao()
#TypeError: Cat.miao() missing 1 required positional argument: 'self'
Cat.speak()
